﻿using System;
using System.Collections.Generic;

namespace DatabaseGroup.SSIS.SourceAdapters.View
{
    /// <summary>
    /// Defines functionality relating to the Column tab of the Editor view
    /// </summary>
    public interface IEditorColumnView : IEditorBaseView
    {
        /// <summary>
        /// Indicates the user wishes to reset the column configuration
        /// based on the current component/source configuration
        /// </summary>
        event EventHandler ResetColumns;

        /// <summary>
        /// Indicates that one of the row/column delimiters has been changed
        /// </summary>
        event EventHandler MainDelimitersChanged;

        /// <summary>
        /// Binds the controls contained on the column tab to the provided settings object
        /// </summary>
        /// <param name="settings">The values to apply to the controls</param>
        void BindColumnTab(ColumnTabSettings settings);

        /// <summary>
        /// Populates the list of preview rows with column data
        /// </summary>
        /// <param name="headers">The column headers to use</param>
        /// <param name="rows">The list of rows containing the column data</param>
        void PopulateColumnPreviewRows(List<string> headers, List<string[]> rows);
    }
}
